home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
fish
/
001-100
/
001-025
/
024
/
modula-2
/
m2
/
filesystem.def
< prev
next >
Wrap
Text File
|
1995-03-17
|
2KB
|
46 lines
(********************************************************************************
Name : FileSystem.DEF
Version : 1.0
Purpose : FileSystem for Modula-2 compiler
Authors : cn/jr/ms/red
Modified : 12.3.86 18:38 cn
State : should be ok
Requirements : fixkey
********************************************************************************)
DEFINITION MODULE FileSystem;
FROM SYSTEM IMPORT WORD;
TYPE
Response = (done, notdone);
File = RECORD
refNum: INTEGER; (* unused *)
fileHandle, (* AMIGAFile *)
firstPos: LONGINT; (* FilePos of buffer[0] *)
lastPos, (* HIGH(buffer)=lastPos-1 *)
curPos: INTEGER; (* next to read or write *)
res: Response;
eof: BOOLEAN;
dirty: BOOLEAN; (* dirty: buffer changed *)
nameString: ARRAY [0..31] OF CHAR;
buffer: ARRAY [0..1024-1] OF CHAR;
END;
PROCEDURE Lookup(VAR f: File; filename: ARRAY OF CHAR; new: BOOLEAN);
PROCEDURE Close(VAR f: File);
PROCEDURE Delete(VAR f: File);
(*PROCEDURE Rename(VAR f: File; filename: ARRAY OF CHAR);*)
PROCEDURE SetPos(VAR f: File; highpos, lowpos: CARDINAL);
PROCEDURE GetPos(VAR f: File; VAR highpos, lowpos: CARDINAL);
PROCEDURE Length(VAR f: File; VAR highpos, lowpos: CARDINAL);
PROCEDURE ReadWord(VAR f: File; VAR w: WORD);
PROCEDURE WriteWord(VAR f: File; w: WORD);
PROCEDURE ReadChar(VAR f: File; VAR ch: CHAR);
PROCEDURE WriteChar(VAR f: File; ch: CHAR);
END FileSystem.